<?php
namespace Home\Controller;
use Think\Page;
use Think\Verify;
class DistanceController extends BaseController {

    public function index(){

        // 如果是手机跳转到 手机模块
        if(true == isMobile()){
            header("Location: ".U('Mobile/Index/index'));
        }

//area
        $province = new \Home\Model\SqldataModel();
        $province=$province->region();
        $this->assign('province',$province);
//header
        $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 3 and `display` = 1 order by `order` desc";
        $second_column = M()->query($sql2);

        $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 3 and `display` = 1 order by `order` desc";
        $third_column = M()->query($sql3);

//index top
        $index_top_one=M()->query("select * from __PREFIX__article_xueli where `first_column_id` = 3 and `position` = 4 and `top` = 3 order by `order`,`id` desc limit 2");
        $index_top_two=M()->query("select * from __PREFIX__article_xueli where `first_column_id` = 3 and `position` = 3 and `top` = 3 order by `order`,`id` desc limit 2");
        $this->assign('index_top_one',$index_top_one);
        $this->assign('index_top_two',$index_top_two);

        $index_top_sm_one_one=M()->query("select * from __PREFIX__article_xueli where `first_column_id` = 3 and `position` = 4 and `top` = 2 order by `order`,`id` desc limit 3");
        $index_top_sm_one_two=M()->query("select * from __PREFIX__article_xueli where `first_column_id` = 3 and `position` = 4 and `top` = 2 order by `order`,`id` desc limit 3,3");
        $index_top_sm_one_three=M()->query("select * from __PREFIX__article_xueli where `first_column_id` = 3 and `position` = 4 and `top` = 2 order by `order`,`id` desc limit 6,3");

        $index_top_sm_two_one=M()->query("select * from __PREFIX__article_xueli where `first_column_id` = 3 and `position` = 3 and `top` = 2 order by `order`,`id` desc limit 3");
        $index_top_sm_two_two=M()->query("select * from __PREFIX__article_xueli where `first_column_id` = 3 and `position` = 3 and `top` = 2 order by `order`,`id` desc limit 3,3");
        $index_top_sm_two_three=M()->query("select * from __PREFIX__article_xueli where `first_column_id` = 3 and `position` = 3 and `top` = 2 order by `order`,`id` desc limit 6,3");

        $this->assign('index_top_sm_one_one',$index_top_sm_one_one);
        $this->assign('index_top_sm_one_two',$index_top_sm_one_two);
        $this->assign('index_top_sm_one_three',$index_top_sm_one_three);
        $this->assign('index_top_sm_two_one',$index_top_sm_two_one);
        $this->assign('index_top_sm_two_two',$index_top_sm_two_two);
        $this->assign('index_top_sm_two_three',$index_top_sm_two_three);


        $common_problem_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 92 and `display` = 1 order by `order`,`id` desc limit 3");
        $common_problem_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 92 and `display` = 1 order by `order`,`id` desc limit 3,3");
        $this->assign('common_problem_one',$common_problem_one);
        $this->assign('common_problem_two',$common_problem_two);

        $ruxuetest_one=M()->query("select * from __PREFIX__article_xueli where `second_column_id` = 24 and `display` = 1 order by `order`,`id` desc limit 3");
        $ruxuetest_two=M()->query("select * from __PREFIX__article_xueli where `second_column_id` = 24 and `display` = 1 order by `order`,`id` desc limit 3,3");
        $this->assign('ruxuetest_one',$ruxuetest_one);
        $this->assign('ruxuetest_two',$ruxuetest_two);

        $registration_guide=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 91 and `display` = 1 order by `order`,`id` desc limit 5");
        $this->assign('registration_guide',$registration_guide);

        $general_info=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 95 and `display` = 1 order by `order`,`id` desc limit 5");
        $this->assign('general_info',$general_info);

        $general_subject=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 96 and `display` = 1 order by `order`,`id` desc limit 5");
        $this->assign('general_subject',$general_subject);

//yx
        $school_news=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 83 and `display` = 1 order by `order`,`id` desc limit 5");
        $this->assign('school_news',$school_news);

        //zy

        $management_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 84 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $management_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 84 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $management_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 84 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $management_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 84 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $management_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 84 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $literature_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 85 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $literature_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 85 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $literature_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 85 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $literature_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 85 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $literature_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 85 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $polytechnic_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 86 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $polytechnic_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 86 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $polytechnic_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 86 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $polytechnic_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 86 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $polytechnic_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 86 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $education_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 87 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $education_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 87 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $education_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 87 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $education_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 87 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $education_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 87 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $medical_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 88 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $medical_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 88 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $medical_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 88 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $medical_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 88 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $medical_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 88 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $agronomy_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 89 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $agronomy_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 89 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $agronomy_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 89 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $agronomy_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 89 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $agronomy_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 89 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $art_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 90 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $art_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 90 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $art_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 90 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $art_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 90 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $art_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 90 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $this->assign('management_one',$management_one);
        $this->assign('management_two',$management_two);
        $this->assign('management_three',$management_three);
        $this->assign('management_four',$management_four);
        $this->assign('management_five',$management_five);

        $this->assign('literature_one',$literature_one);
        $this->assign('literature_two',$literature_two);
        $this->assign('literature_three',$literature_three);
        $this->assign('literature_four',$literature_four);
        $this->assign('literature_five',$literature_five);

        $this->assign('polytechnic_one',$polytechnic_one);
        $this->assign('polytechnic_two',$polytechnic_two);
        $this->assign('polytechnic_three',$polytechnic_three);
        $this->assign('polytechnic_four',$polytechnic_four);
        $this->assign('polytechnic_five',$polytechnic_five);

        $this->assign('education_one',$education_one);
        $this->assign('education_two',$education_two);
        $this->assign('education_three',$education_three);
        $this->assign('education_four',$education_four);
        $this->assign('education_five',$education_five);

        $this->assign('medical_one',$medical_one);
        $this->assign('medical_two',$medical_two);
        $this->assign('medical_three',$medical_three);
        $this->assign('medical_four',$medical_four);
        $this->assign('medical_five',$medical_five);

        $this->assign('agronomy_one',$agronomy_one);
        $this->assign('agronomy_two',$agronomy_two);
        $this->assign('agronomy_three',$agronomy_three);
        $this->assign('agronomy_four',$agronomy_four);
        $this->assign('agronomy_five',$agronomy_five);

        $this->assign('art_one',$history_one);
        $this->assign('art_two',$history_two);
        $this->assign('art_three',$history_three);
        $this->assign('art_four',$history_four);
        $this->assign('art_five',$history_five);

//bottom
        $admission_query=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 94 and `display` = 1 order by `order`,`id` desc limit 5");
        $this->assign('admission_query',$admission_query);
        $admission_note=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 97 and `display` = 1 order by `order`,`id` desc limit 5");
        $this->assign('admission_note',$admission_note);
        $term_arrangement=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 99 and `display` = 1 order by `order`,`id` desc limit 5");
        $this->assign('term_arrangement',$term_arrangement);

        $this->assign('second_column',$second_column);
        $this->assign('third_column',$third_column);
        $this->assign('fourth_column',$fourth_column);

        $this->display();
    }

    public function article_detail(){
      $sql1 = "select * from __PREFIX__region2 where `level` = 1 and `display` = 1 ";
      $province = M()->query($sql1);
      $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 3 and `display` = 1 order by `order` desc";
      $second_column = M()->query($sql2);
      $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 3 and `display` = 1 order by `order` desc";
      $third_column = M()->query($sql3);
      $article=M('article_xueli');

      if(isset($_GET['id']) && $_GET['id'] != ''){
        $article_id=$_GET['id'];
        $select_article=$article->query("select * from __PREFIX__article_xueli where `id` = '$article_id'");
        $select_article=$select_article[0];
        $first_column_id=$select_article['first_column_id'];
        $second_column_id=$select_article['second_column_id'];
        $third_column_id=$select_article['third_column_id'];
        $fourth_column_id=$select_article['fourth_column_id'];
        $first_column_name=M()->query("select * from __PREFIX__first_column where `id` = '$first_column_id'");
        $second_column_name=M()->query("select * from __PREFIX__second_column where `id` = '$second_column_id'");
        $third_column_name=M()->query("select * from __PREFIX__third_column where `id` = '$third_column_id'");
        $fourth_column_name=M()->query("select * from __PREFIX__fourth_column where `id` = '$fourth_column_id'");
      }
      $this->assign('province',$province);
      $this->assign('second_column',$second_column);
      $this->assign('third_column',$third_column);
      $this->assign('select_article',$select_article);
      $this->assign('first_column_name',$first_column_name);
      $this->assign('second_column_name',$second_column_name);
      $this->assign('third_column_name',$third_column_name);
      $this->assign('fourth_column_name',$fourth_column_name);
      $this->display();
    }

    public function common(){
        if(isset($_GET['fid']) && $_GET['fid'] != ''){
          $fourth_column_id=$_GET['fid'];

          $sql1 = "select * from __PREFIX__region2 where `level` = 1 and `display` =1";
          $province = M()->query($sql1);
          $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 3 and `display` = 1 order by `order` desc";
          $second_column = M()->query($sql2);
          $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 3 and `display` = 1 order by `order` desc";
          $third_column = M()->query($sql3);

          $p = empty($_REQUEST['p']) ? 1 : $_REQUEST['p'];
          $size = empty($_REQUEST['size']) ? 40 : $_REQUEST['size'];
          $where = " 1 = 1 ";
          $where.=" and fourth_column_id='$fourth_column_id'";
          $article=M('article_xueli');
          $res = $article->where($where)->order('`order` desc,`id` desc')->page("$p,$size")->select();
          $count = $article->where($where)->count();
          $pager = new \Think\Page($count,$size);
          $page = $pager->show();

          $fourth_column_name=M()->query("select * from __PREFIX__fourth_column where `id` = '$fourth_column_id'");
          $third_column_id=$fourth_column_name[0]['third_column_id'];
          $third_column_name=M()->query("select * from __PREFIX__third_column where `id` = '$third_column_id'");
          $second_column_id=$third_column_name[0]['second_column_id'];
          $second_column_name=M()->query("select * from __PREFIX__second_column where `id` = '$second_column_id'");

          $this->assign('province',$province);
          $this->assign('second_column',$second_column);
          $this->assign('third_column',$third_column);
          $this->assign('page',$page);
          $this->assign('article',$res);
          $this->assign('fourth_column_name',$fourth_column_name);
          $this->assign('third_column_name',$third_column_name);
          $this->assign('second_column_name',$second_column_name);
          $this->display();
        }elseif(isset($_GET['id']) && $_GET['id'] != ''){
          $third_column_id=$_GET['id'];

          $sql1 = "select * from __PREFIX__region2 where `level` = 1 and `display` =1";
          $province = M()->query($sql1);
          $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 3 and `display` = 1 order by `order` desc";
          $second_column = M()->query($sql2);
          $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 3 and `display` = 1 order by `order` desc";
          $third_column = M()->query($sql3);

          $p = empty($_REQUEST['p']) ? 1 : $_REQUEST['p'];
          $size = empty($_REQUEST['size']) ? 40 : $_REQUEST['size'];
          $where = " 1 = 1 ";
          $where.=" and third_column_id='$third_column_id'";
          $article=M('article_xueli');
          $res = $article->where($where)->order('`order` desc,`id` desc')->page("$p,$size")->select();
          $count = $article->where($where)->count();
          $pager = new \Think\Page($count,$size);
          $page = $pager->show();


          $third_column_name=M()->query("select * from __PREFIX__third_column where `id` = '$third_column_id'");
          $second_column_id=$third_column_name[0]['second_column_id'];
          $second_column_name=M()->query("select * from __PREFIX__second_column where `id` = '$second_column_id'");

          $this->assign('province',$province);
          $this->assign('second_column',$second_column);
          $this->assign('third_column',$third_column);
          $this->assign('page',$page);
          $this->assign('article',$res);
          $this->assign('third_column_name',$third_column_name);
          $this->assign('second_column_name',$second_column_name);
          $this->display();
        }else{
          echo "getting information failure"."<br/>";
        }
    }

    public function recruit(){
        $sql1 = "select * from __PREFIX__region2 where `level` = 1 and `display` = 1 ";
        $province = M()->query($sql1);
        $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 3 and `display` = 1 order by `order` desc";
        $second_column = M()->query($sql2);
        $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 3 and `display` = 1 order by `order` desc";
        $third_column = M()->query($sql3);

        $article=M()->query("select * from __PREFIX__article_xueli where `second_column_id` = 22 and `display` = 1 order by `order`,`id` desc");

        $this->assign('province',$province);
        $this->assign('second_column',$second_column);
        $this->assign('third_column',$third_column);
        $this->assign("article",$article);
        $this->display();
    }


    public function fractional_line(){
      $sql1 = "select * from __PREFIX__region2 where `level` = 1 limit 32";
      $province = M()->query($sql1);
      $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
      $second_column = M()->query($sql2);
      $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
      $third_column = M()->query($sql3);

      $article_official=M()->query("select * from __PREFIX__article_xueli where `keywords` like '%官方查询入口%'");
      $article_this_year=M()->query("select * from __PREFIX__article_xueli where `keywords` like '%2016年分数线%'");
      $article_last_year=M()->query("select * from __PREFIX__article_xueli where `keywords` like '%历年分数线%'");

      $this->assign('province',$province);
      $this->assign('second_column',$second_column);
      $this->assign('third_column',$third_column);
      $this->assign('article_official',$article_official);
      $this->assign('article_this_year',$article_this_year);
      $this->assign('article_last_year',$article_last_year);
      $this->display();
    }

    public function high_starting_subject(){
      if(isset($_GET['id']) && isset($_GET['od']) && $_GET['id'] != '' && $_GET['od'] != ''){
        if($_GET['id'] == 19 && $_GET['od'] == 1){
          $third_column_id=19;
          $fourth_column_id=17;
        }elseif ($_GET['id'] == 19 && $_GET['od'] == 2) {
          $third_column_id=19;
          $fourth_column_id=18;
        }elseif ($_GET['id'] == 19 && $_GET['od'] == 3) {
          $third_column_id=19;
          $fourth_column_id=19;
        }elseif ($_GET['id'] == 19 && $_GET['od'] == 4) {
          $third_column_id=19;
          $fourth_column_id=20;
        }elseif ($_GET['id'] == 20 && $_GET['od'] == 1) {
          $third_column_id=20;
          $fourth_column_id=21;
        }elseif ($_GET['id'] == 20 && $_GET['od'] == 2) {
          $third_column_id=20;
          $fourth_column_id=22;
        }elseif ($_GET['id'] == 20 && $_GET['od'] == 3) {
          $third_column_id=20;
          $fourth_column_id=23;
        }elseif ($_GET['id'] == 20 && $_GET['od'] == 4) {
          $third_column_id=20;
          $fourth_column_id=24;
        }elseif ($_GET['id'] == 21 && $_GET['od'] == 1) {
          $third_column_id=21;
          $fourth_column_id=25;
        }elseif ($_GET['id'] == 21 && $_GET['od'] == 2) {
          $third_column_id=21;
          $fourth_column_id=26;
        }elseif ($_GET['id'] == 21 && $_GET['od'] == 3) {
          $third_column_id=21;
          $fourth_column_id=27;
        }elseif ($_GET['id'] == 21 && $_GET['od'] == 4) {
          $third_column_id=21;
          $fourth_column_id=28;
        }elseif ($_GET['id'] == 22 && $_GET['od'] == 1) {
          $third_column_id=22;
          $fourth_column_id=29;
        }elseif ($_GET['id'] == 22 && $_GET['od'] == 2) {
          $third_column_id=22;
          $fourth_column_id=30;
        }elseif ($_GET['id'] == 22 && $_GET['od'] == 3) {
          $third_column_id=22;
          $fourth_column_id=31;
        }elseif ($_GET['id'] == 22 && $_GET['od'] == 4) {
          $third_column_id=22;
          $fourth_column_id=32;
        }elseif ($_GET['id'] == 23 && $_GET['od'] == 1) {
          $third_column_id=23;
          $fourth_column_id=33;
        }elseif ($_GET['id'] == 23 && $_GET['od'] == 2) {
          $third_column_id=23;
          $fourth_column_id=34;
        }elseif ($_GET['id'] == 23 && $_GET['od'] == 3) {
          $third_column_id=23;
          $fourth_column_id=35;
        }elseif ($_GET['id'] == 23 && $_GET['od'] == 4) {
          $third_column_id=23;
          $fourth_column_id=36;
        }elseif ($_GET['id'] == 24 && $_GET['od'] == 1) {
          $third_column_id=24;
          $fourth_column_id=37;
        }elseif ($_GET['id'] == 24 && $_GET['od'] == 2) {
          $third_column_id=24;
          $fourth_column_id=38;
        }elseif ($_GET['id'] == 24 && $_GET['od'] == 3) {
          $third_column_id=24;
          $fourth_column_id=39;
        }elseif ($_GET['id'] == 24 && $_GET['od'] == 4) {
          $third_column_id=24;
          $fourth_column_id=40;
        }
        $third_column_name=M()->query("select * from __PREFIX__third_column where `id` = '$third_column_id'");
        $fourth_column_name=M()->query("select * from __PREFIX__fourth_column where `id` = '$fourth_column_id'");

        $sql1 = "select * from __PREFIX__region2 where `level` = 1 limit 32";
        $province = M()->query($sql1);
        $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $second_column = M()->query($sql2);
        $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $third_column = M()->query($sql3);

        $p = empty($_REQUEST['p']) ? 1 : $_REQUEST['p'];
        $size = empty($_REQUEST['size']) ? 40 : $_REQUEST['size'];
        $where = " 1 = 1 ";
        $where.=" and `fourth_column_id` = '$fourth_column_id' and `display` = '1'";
        $article=M('article_xueli');
        $res = $article->where($where)->order('`order` desc,`id` desc')->page("$p,$size")->select();
        $count = $article->where($where)->count();
        $pager = new \Think\Page($count,$size);
        $page = $pager->show();

        $right_two=$article->query("select * from __PREFIX__article_xueli where `third_column_id` = '1' order by `order`,`id` desc limit 10");

        $this->assign('province',$province);
        $this->assign('second_column',$second_column);
        $this->assign('third_column',$third_column);
        $this->assign('right_two',$right_two);
        $this->assign('page',$page);
        $this->assign('article_main',$res);
        $this->assign('third_column_name',$third_column_name);
        $this->assign('fourth_column_name',$fourth_column_name);
        $this->display();
      }else{
        echo "getting information failure"."<br/>";
      }
    }

    public function review_subject_detail(){
      $sql1 = "select * from __PREFIX__region2 where `level` = 1 and `display` = 1";
      $province = M()->query($sql1);
      $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 2 and `display` = 1 order by `order` desc";
      $second_column = M()->query($sql2);
      $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 2 and `display` = 1 order by `order` desc";
      $third_column = M()->query($sql3);

      $article=M('article_xueli');
      $article_one_economics = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 125 order by `order`,`id` limit 10");
      $article_two_economics = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 126 order by `order`,`id` limit 10");
      $article_three_economics = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 127 order by `order`,`id` limit 5");
      $article_four_economics = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 128 order by `order`,`id` limit 5");

      $article_one_law = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 129 order by `order`,`id` limit 10");
      $article_two_law = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 130 order by `order`,`id` limit 10");
      $article_three_law = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 131 order by `order`,`id` limit 5");
      $article_four_law = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 132 order by `order`,`id` limit 5");

      $article_one_engineering = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 133 order by `order`,`id` limit 10");
      $article_two_engineering = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 134 order by `order`,`id` limit 10");
      $article_three_engineering = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 135 order by `order`,`id` limit 5");
      $article_four_engineering = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 136 order by `order`,`id` limit 5");

      $article_one_education = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 137 order by `order`,`id` limit 10");
      $article_two_education = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 138 order by `order`,`id` limit 10");
      $article_three_education = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 139 order by `order`,`id` limit 5");
      $article_four_education = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 140 order by `order`,`id` limit 5");

      $article_one_literature = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 141 order by `order`,`id` limit 10");
      $article_two_literature = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 142 order by `order`,`id` limit 10");
      $article_three_literature = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 143 order by `order`,`id` limit 5");
      $article_four_literature = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 144 order by `order`,`id` limit 5");

      $article_one_medical = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 145 order by `order`,`id` limit 10");
      $article_two_medical = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 146 order by `order`,`id` limit 10");
      $article_three_medical = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 147 order by `order`,`id` limit 5");
      $article_four_medical = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 148 order by `order`,`id` limit 5");

      $article_one_agronomy = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 149 order by `order`,`id` limit 10");
      $article_two_agronomy = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 150 order by `order`,`id` limit 10");
      $article_three_agronomy = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 151 order by `order`,`id` limit 5");
      $article_four_agronomy = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 152 order by `order`,`id` limit 5");

      $article_one_administration = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 153 order by `order`,`id` limit 10");
      $article_two_administration = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 154 order by `order`,`id` limit 10");
      $article_three_administration = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 155 order by `order`,`id` limit 5");
      $article_four_administration = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 156 order by `order`,`id` limit 5");

      $article_one_common = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 157 order by `order`,`id` limit 10");
      $article_two_common = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 158 order by `order`,`id` limit 10");
      $article_three_common = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 159 order by `order`,`id` limit 5");
      $article_four_common = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 160 order by `order`,`id` limit 5");

      $this->assign('province',$province);
      $this->assign('second_column',$second_column);
      $this->assign('third_column',$third_column);

      $this->assign('article_one_economics',$article_one_economics);
      $this->assign('article_two_economics',$article_two_economics);
      $this->assign('article_three_economics',$article_three_economics);
      $this->assign('article_four_economics',$article_four_economics);

      $this->assign('article_one_law',$article_one_law);
      $this->assign('article_two_law',$article_two_law);
      $this->assign('article_three_law',$article_three_law);
      $this->assign('article_four_law',$article_four_law);

      $this->assign('article_one_engineering',$article_one_engineering);
      $this->assign('article_two_engineering',$article_two_engineering);
      $this->assign('article_three_engineering',$article_three_engineering);
      $this->assign('article_four_engineering',$article_four_engineering);

      $this->assign('article_one_education',$article_one_education);
      $this->assign('article_two_education',$article_two_education);
      $this->assign('article_three_education',$article_three_education);
      $this->assign('article_four_education',$article_four_education);

      $this->assign('article_one_literature',$article_one_literature);
      $this->assign('article_two_literature',$article_two_literature);
      $this->assign('article_three_literature',$article_three_literature);
      $this->assign('article_four_literature',$article_four_literature);

      $this->assign('article_one_medical',$article_one_medical);
      $this->assign('article_two_medical',$article_two_medical);
      $this->assign('article_three_medical',$article_three_medical);
      $this->assign('article_four_medical',$article_four_medical);

      $this->assign('article_one_agronomy',$article_one_agronomy);
      $this->assign('article_two_agronomy',$article_two_agronomy);
      $this->assign('article_three_agronomy',$article_three_agronomy);
      $this->assign('article_four_agronomy',$article_four_agronomy);

      $this->assign('article_one_administration',$article_one_administration);
      $this->assign('article_two_administration',$article_two_administration);
      $this->assign('article_three_administration',$article_three_administration);
      $this->assign('article_four_administration',$article_four_administration);

      $this->assign('article_one_common',$article_one_common);
      $this->assign('article_two_common',$article_two_common);
      $this->assign('article_three_common',$article_three_common);
      $this->assign('article_four_common',$article_four_common);
      $this->display();
    }

    //fourthym
    public function review_subject_detail_list(){
      if(isset($_GET['id']) && isset($_GET['od']) && $_GET['id'] != '' && $_GET['od'] != ''){
        if($_GET['id'] == 25 && $_GET['od'] == 1){
          $third_column_id=25;
          $fourth_column_id=41;
        }elseif ($_GET['id'] == 25 && $_GET['od'] == 2) {
          $third_column_id=25;
          $fourth_column_id=42;
        }elseif ($_GET['id'] == 25 && $_GET['od'] == 3) {
          $third_column_id=25;
          $fourth_column_id=43;
        }elseif ($_GET['id'] == 25 && $_GET['od'] == 4) {
          $third_column_id=25;
          $fourth_column_id=44;
        }elseif ($_GET['id'] == 26 && $_GET['od'] == 1) {
          $third_column_id=26;
          $fourth_column_id=45;
        }elseif ($_GET['id'] == 26 && $_GET['od'] == 2) {
          $third_column_id=26;
          $fourth_column_id=46;
        }elseif ($_GET['id'] == 26 && $_GET['od'] == 3) {
          $third_column_id=26;
          $fourth_column_id=47;
        }elseif ($_GET['id'] == 26 && $_GET['od'] == 4) {
          $third_column_id=26;
          $fourth_column_id=48;
        }elseif ($_GET['id'] == 27 && $_GET['od'] == 1) {
          $third_column_id=27;
          $fourth_column_id=49;
        }elseif ($_GET['id'] == 27 && $_GET['od'] == 2) {
          $third_column_id=27;
          $fourth_column_id=50;
        }elseif ($_GET['id'] == 27 && $_GET['od'] == 3) {
          $third_column_id=27;
          $fourth_column_id=51;
        }elseif ($_GET['id'] == 27 && $_GET['od'] == 4) {
          $third_column_id=27;
          $fourth_column_id=52;
        }elseif ($_GET['id'] == 28 && $_GET['od'] == 1) {
          $third_column_id=28;
          $fourth_column_id=53;
        }elseif ($_GET['id'] == 28 && $_GET['od'] == 2) {
          $third_column_id=28;
          $fourth_column_id=54;
        }elseif ($_GET['id'] == 28 && $_GET['od'] == 3) {
          $third_column_id=28;
          $fourth_column_id=55;
        }elseif ($_GET['id'] == 28 && $_GET['od'] == 4) {
          $third_column_id=28;
          $fourth_column_id=56;
        }elseif ($_GET['id'] == 29 && $_GET['od'] == 1) {
          $third_column_id=29;
          $fourth_column_id=57;
        }elseif ($_GET['id'] == 29 && $_GET['od'] == 2) {
          $third_column_id=29;
          $fourth_column_id=58;
        }elseif ($_GET['id'] == 29 && $_GET['od'] == 3) {
          $third_column_id=29;
          $fourth_column_id=59;
        }elseif ($_GET['id'] == 29 && $_GET['od'] == 4) {
          $third_column_id=29;
          $fourth_column_id=60;
        }elseif ($_GET['id'] == 30 && $_GET['od'] == 1) {
          $third_column_id=30;
          $fourth_column_id=61;
        }elseif ($_GET['id'] == 30 && $_GET['od'] == 2) {
          $third_column_id=30;
          $fourth_column_id=62;
        }elseif ($_GET['id'] == 30 && $_GET['od'] == 3) {
          $third_column_id=30;
          $fourth_column_id=63;
        }elseif ($_GET['id'] == 30 && $_GET['od'] == 4) {
          $third_column_id=30;
          $fourth_column_id=64;
        }elseif ($_GET['id'] == 31 && $_GET['od'] == 1) {
          $third_column_id=31;
          $fourth_column_id=65;
        }elseif ($_GET['id'] == 31 && $_GET['od'] == 2) {
          $third_column_id=31;
          $fourth_column_id=66;
        }elseif ($_GET['id'] == 31 && $_GET['od'] == 3) {
          $third_column_id=31;
          $fourth_column_id=67;
        }elseif ($_GET['id'] == 31 && $_GET['od'] == 4) {
          $third_column_id=31;
          $fourth_column_id=68;
        }elseif ($_GET['id'] == 32 && $_GET['od'] == 1) {
          $third_column_id=32;
          $fourth_column_id=69;
        }elseif ($_GET['id'] == 32 && $_GET['od'] == 2) {
          $third_column_id=32;
          $fourth_column_id=70;
        }elseif ($_GET['id'] == 32 && $_GET['od'] == 3) {
          $third_column_id=32;
          $fourth_column_id=71;
        }elseif ($_GET['id'] == 32 && $_GET['od'] == 4) {
          $third_column_id=32;
          $fourth_column_id=72;
        }elseif ($_GET['id'] == 33 && $_GET['od'] == 1) {
          $third_column_id=33;
          $fourth_column_id=73;
        }elseif ($_GET['id'] == 33 && $_GET['od'] == 2) {
          $third_column_id=33;
          $fourth_column_id=74;
        }elseif ($_GET['id'] == 33 && $_GET['od'] == 3) {
          $third_column_id=33;
          $fourth_column_id=75;
        }elseif ($_GET['id'] == 33 && $_GET['od'] == 4) {
          $third_column_id=33;
          $fourth_column_id=76;
        }
        $third_column_name=M()->query("select * from __PREFIX__third_column where `id` = '$third_column_id'");
        $fourth_column_name=M()->query("select * from __PREFIX__fourth_column where `id` = '$fourth_column_id'");

        $sql1 = "select * from __PREFIX__region2 where `level` = 1 limit 32";
        $province = M()->query($sql1);
        $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $second_column = M()->query($sql2);
        $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $third_column = M()->query($sql3);

        $p = empty($_REQUEST['p']) ? 1 : $_REQUEST['p'];
        $size = empty($_REQUEST['size']) ? 40 : $_REQUEST['size'];
        $where = " 1 = 1 ";
        $where.=" and `fourth_column_id` = '$fourth_column_id' and `display` = '1'";
        $article=M('article_xueli');
        $res = $article->where($where)->order('`order` desc,`id` desc')->page("$p,$size")->select();
        $count = $article->where($where)->count();
        $pager = new \Think\Page($count,$size);
        $page = $pager->show();

        $right_two=$article->query("select * from __PREFIX__article_xueli where `third_column_id` = '1' order by `order`,`id` desc limit 10");

        $this->assign('province',$province);
        $this->assign('second_column',$second_column);
        $this->assign('third_column',$third_column);
        $this->assign('right_two',$right_two);
        $this->assign('page',$page);
        $this->assign('article_main',$res);
        $this->assign('third_column_name',$third_column_name);
        $this->assign('fourth_column_name',$fourth_column_name);
        $this->display();
      }else{
        echo "getting information failure"."<br/>";
      }
    }
    //zhuangshengben shouye
    public function upgraded(){
      $sql1 = "select * from __PREFIX__region2 where `level` = 1 limit 32";
      $province = M()->query($sql1);
      $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
      $second_column = M()->query($sql2);
      $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
      $third_column = M()->query($sql3);

      $article=M('article_xueli');
      $article_one_chinese = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 41 order by `order`,`id` limit 10");
      $article_two_chinese = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 42 order by `order`,`id` limit 10");
      $article_three_chinese = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 43 order by `order`,`id` limit 5");
      $article_four_chinese = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 44 order by `order`,`id` limit 5");

      $article_one_english = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 45 order by `order`,`id` limit 10");
      $article_two_english = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 46 order by `order`,`id` limit 10");
      $article_three_english = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 47 order by `order`,`id` limit 5");
      $article_four_english = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 48 order by `order`,`id` limit 5");

      $article_one_math = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 49 order by `order`,`id` limit 10");
      $article_two_math = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 50 order by `order`,`id` limit 10");
      $article_three_math = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 51 order by `order`,`id` limit 5");
      $article_four_math = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 52 order by `order`,`id` limit 5");

      $article_one_politics = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 53 order by `order`,`id` limit 10");
      $article_two_politics = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 54 order by `order`,`id` limit 10");
      $article_three_politics = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 55 order by `order`,`id` limit 5");
      $article_four_politics = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 56 order by `order`,`id` limit 5");

      $article_one_art = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 57 order by `order`,`id` limit 10");
      $article_two_art = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 58 order by `order`,`id` limit 10");
      $article_three_art = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 59 order by `order`,`id` limit 5");
      $article_four_art = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 60 order by `order`,`id` limit 5");

      $article_one_ecology = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 61 order by `order`,`id` limit 10");
      $article_two_ecology = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 62 order by `order`,`id` limit 10");
      $article_three_ecology = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 63 order by `order`,`id` limit 5");
      $article_four_ecology = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 64 order by `order`,`id` limit 5");

      $article_one_civillaw = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 65 order by `order`,`id` limit 10");
      $article_two_civillaw = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 66 order by `order`,`id` limit 10");
      $article_three_civillaw = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 67 order by `order`,`id` limit 5");
      $article_four_civillaw = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 68 order by `order`,`id` limit 5");

      $article_one_education = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 69 order by `order`,`id` limit 10");
      $article_two_education = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 70 order by `order`,`id` limit 10");
      $article_three_education = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 71 order by `order`,`id` limit 5");
      $article_four_education = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 72 order by `order`,`id` limit 5");

      $article_one_medical = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 73 order by `order`,`id` limit 10");
      $article_two_medical = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 74 order by `order`,`id` limit 10");
      $article_three_medical = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 75 order by `order`,`id` limit 5");
      $article_four_medical = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 76 order by `order`,`id` limit 5");


      $this->assign('province',$province);
      $this->assign('second_column',$second_column);
      $this->assign('third_column',$third_column);

      $this->assign('article_one_chinese',$article_one_chinese);
      $this->assign('article_two_chinese',$article_two_chinese);
      $this->assign('article_three_chinese',$article_three_chinese);
      $this->assign('article_four_chinese',$article_four_chinese);

      $this->assign('article_one_english',$article_one_english);
      $this->assign('article_two_english',$article_two_english);
      $this->assign('article_three_english',$article_three_english);
      $this->assign('article_four_english',$article_four_english);

      $this->assign('article_one_math',$article_one_math);
      $this->assign('article_two_math',$article_two_math);
      $this->assign('article_three_math',$article_three_math);
      $this->assign('article_four_math',$article_four_math);

      $this->assign('article_one_politics',$article_one_politics);
      $this->assign('article_two_politics',$article_two_politics);
      $this->assign('article_three_politics',$article_three_politics);
      $this->assign('article_four_politics',$article_four_politics);

      $this->assign('article_one_art',$article_one_art);
      $this->assign('article_two_art',$article_two_art);
      $this->assign('article_three_art',$article_three_art);
      $this->assign('article_four_art',$article_four_art);

      $this->assign('article_one_ecology',$article_one_ecology);
      $this->assign('article_two_ecology',$article_two_ecology);
      $this->assign('article_three_ecology',$article_three_ecology);
      $this->assign('article_four_ecology',$article_four_ecology);

      $this->assign('article_one_civillaw',$article_one_civillaw);
      $this->assign('article_two_civillaw',$article_two_civillaw);
      $this->assign('article_three_civillaw',$article_three_civillaw);
      $this->assign('article_four_civillaw',$article_four_civillaw);

      $this->assign('article_one_education',$article_one_education);
      $this->assign('article_two_education',$article_two_education);
      $this->assign('article_three_education',$article_three_education);
      $this->assign('article_four_education',$article_four_education);

      $this->assign('article_one_medical',$article_one_medical);
      $this->assign('article_two_medical',$article_two_medical);
      $this->assign('article_three_medical',$article_three_medical);
      $this->assign('article_four_medical',$article_four_medical);
      $this->display();
    }

    public function hot_news(){
      if(isset($_GET['id']) && $_GET['id'] != ''){
        $third_column_id=$_GET['id'];

        $sql1 = "select * from __PREFIX__region2 where `level` = 1 limit 32";
        $province = M()->query($sql1);
        $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $second_column = M()->query($sql2);
        $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $third_column = M()->query($sql3);

        $p = empty($_REQUEST['p']) ? 1 : $_REQUEST['p'];
        $size = empty($_REQUEST['size']) ? 10 : $_REQUEST['size'];
        $where = " 1 = 1 ";
        $where.=" and `third_column_id` = '$third_column_id' and `display` = '1'";
        $article=M('article_xueli');
        $res = $article->where($where)->order('`order` desc,`id` desc')->page("$p,$size")->select();
        $count = $article->where($where)->count();
        $pager = new \Think\Page($count,$size);
        $page = $pager->show();
        $right_two=$article->query("select * from __PREFIX__article_xueli where `third_column_id` = '1' order by `order`,`id` desc limit 10");

        $third_column_name=M()->query("select * from __PREFIX__third_column where `id` = '$third_column_id'");

        $this->assign('province',$province);
        $this->assign('second_column',$second_column);
        $this->assign('third_column',$third_column);
        $this->assign('page',$page);
        $this->assign('article_main',$res);
        $this->assign('right_two',$right_two);
        $this->assign('third_column_name',$third_column_name);
        $this->display();
      }else{
        echo "getting information failure"."<br/>";
      }
    }

    public function news_list(){
      $sql1 = "select * from __PREFIX__region2 where `level` = 1 limit 32";
      $province = M()->query($sql1);
      $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
      $second_column = M()->query($sql2);
      $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
      $third_column = M()->query($sql3);

      $p = empty($_REQUEST['p']) ? 1 : $_REQUEST['p'];
      $size = empty($_REQUEST['size']) ? 40 : $_REQUEST['size'];
      $where = " 1 = 1 ";
      $where.=" and `second_column_id` = 1 and `display` = '1'";
      $article=M('article_xueli');
      $res = $article->where($where)->order('`order` desc,`id` desc')->page("$p,$size")->select();
      $count = $article->where($where)->count();
      $pager = new \Think\Page($count,$size);
      $page = $pager->show();
      $right_two=$article->query("select * from __PREFIX__article_xueli where `third_column_id` = '1' order by `order`,`id` desc limit 10");


      $this->assign('province',$province);
      $this->assign('second_column',$second_column);
      $this->assign('third_column',$third_column);
      $this->assign('page',$page);
      $this->assign('article_main',$res);
      $this->assign('right_two',$right_two);
      $this->display();
    }

    public function news_list_subject(){
      if(isset($_GET['id']) && $_GET['id'] != ''){
        $third_column_id=$_GET['id'];

        $sql1 = "select * from __PREFIX__region2 where `level` = 1 limit 32";
        $province = M()->query($sql1);
        $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $second_column = M()->query($sql2);
        $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $third_column = M()->query($sql3);

        $third_column_name=M()->query("select * from __PREFIX__third_column where `id` = '$third_column_id'");

        $p = empty($_REQUEST['p']) ? 1 : $_REQUEST['p'];
        $size = empty($_REQUEST['size']) ? 40 : $_REQUEST['size'];
        $where = " 1 = 1 ";
        $where.=" and `third_column_id` = '$third_column_id' and `display` = '1'";
        $article=M('article_xueli');
        $res = $article->where($where)->order('`order` desc,`id` desc')->page("$p,$size")->select();
        $count = $article->where($where)->count();
        $pager = new \Think\Page($count,$size);
        $page = $pager->show();
        $right_two=$article->query("select * from __PREFIX__article_xueli where `third_column_id` = '1' order by `order`,`id` desc limit 10");


        $this->assign('province',$province);
        $this->assign('second_column',$second_column);
        $this->assign('third_column',$third_column);
        $this->assign('page',$page);
        $this->assign('article_main',$res);
        $this->assign('right_two',$right_two);
        $this->assign('third_column_name',$third_column_name);
        $this->display();
      }else{
        echo "getting information failure"."<br/>";
      }
    }

    public function recruit_students_school(){
      if(isset($_GET['id']) && $_GET['id'] != ''){
        $third_column_id=$_GET['id'];

        $sql1 = "select * from __PREFIX__region2 where `level` = 1 limit 32";
        $province = M()->query($sql1);
        $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $second_column = M()->query($sql2);
        $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $third_column = M()->query($sql3);

        $third_column_name=M()->query("select * from __PREFIX__third_column where `id` = '$third_column_id'");

        $article=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = '$third_column_id' and `display` = 1");

        $this->assign('province',$province);
        $this->assign('second_column',$second_column);
        $this->assign('third_column',$third_column);
        $this->assign('third_column_name',$third_column_name);
        $this->assign('article',$article);
        $this->display();
      }else{
        echo "getting information failure"."<br/>";
      }
    }

    public function recruit_students_subject(){
        $sql1 = "select * from __PREFIX__region2 where `level` = 1 and `display` = 1";
        $province = M()->query($sql1);
        $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 3 and `display` = 1 order by `order` desc";
        $second_column = M()->query($sql2);
        $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 3 and `display` = 1 order by `order` desc";
        $third_column = M()->query($sql3);

        $management_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 84 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $management_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 84 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $management_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 84 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $management_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 84 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $management_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 84 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $literature_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 85 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $literature_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 85 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $literature_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 85 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $literature_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 85 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $literature_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 85 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $polytechnic_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 86 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $polytechnic_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 86 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $polytechnic_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 86 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $polytechnic_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 86 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $polytechnic_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 86 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $education_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 87 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $education_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 87 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $education_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 87 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $education_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 87 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $education_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 87 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $medicine_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 88 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $medicine_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 88 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $medicine_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 88 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $medicine_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 88 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $medicine_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 88 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $agronomy_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 89 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $agronomy_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 89 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $agronomy_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 89 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $agronomy_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 89 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $agronomy_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 89 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $art_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 90 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $art_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 90 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $art_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 90 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $art_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 90 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $art_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 90 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $this->assign('management_one',$management_one);
        $this->assign('management_two',$management_two);
        $this->assign('management_three',$management_three);
        $this->assign('management_four',$management_four);
        $this->assign('management_five',$management_five);

        $this->assign('literature_one',$literature_one);
        $this->assign('literature_two',$literature_two);
        $this->assign('literature_three',$literature_three);
        $this->assign('literature_four',$literature_four);
        $this->assign('literature_five',$literature_five);

        $this->assign('polytechnic_one',$polytechnic_one);
        $this->assign('polytechnic_two',$polytechnic_two);
        $this->assign('polytechnic_three',$polytechnic_three);
        $this->assign('polytechnic_four',$polytechnic_four);
        $this->assign('polytechnic_five',$polytechnic_five);

        $this->assign('education_one',$education_one);
        $this->assign('education_two',$education_two);
        $this->assign('education_three',$education_three);
        $this->assign('education_four',$education_four);
        $this->assign('education_five',$education_five);

        $this->assign('medicine_one',$medicine_one);
        $this->assign('medicine_two',$medicine_two);
        $this->assign('medicine_three',$medicine_three);
        $this->assign('medicine_four',$medicine_four);
        $this->assign('medicine_five',$medicine_five);

        $this->assign('agronomy_one',$agronomy_one);
        $this->assign('agronomy_two',$agronomy_two);
        $this->assign('agronomy_three',$agronomy_three);
        $this->assign('agronomy_four',$agronomy_four);
        $this->assign('agronomy_five',$agronomy_five);

        $this->assign('art_one',$art_one);
        $this->assign('art_two',$art_two);
        $this->assign('art_three',$art_three);
        $this->assign('art_four',$art_four);
        $this->assign('art_five',$art_five);

        $this->assign('province',$province);
        $this->assign('second_column',$second_column);
        $this->assign('third_column',$third_column);
        $this->display();
    }


    public function review_subject(){
        $sql1 = "select * from __PREFIX__region2 where `level` = 1 and `display` = 1";
        $province = M()->query($sql1);
        $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 2 and `display` = 1 order by `order` desc";
        $second_column = M()->query($sql2);
        $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 2 and `display` = 1 order by `order` desc";
        $third_column = M()->query($sql3);

        $economics_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 67 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $economics_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 67 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $economics_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 67 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $economics_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 67 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $economics_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 67 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $law_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 68 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $law_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 68 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $law_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 68 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $law_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 68 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $law_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 68 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $engineering_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 69 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $engineering_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 69 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $engineering_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 69 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $engineering_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 69 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $engineering_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 69 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $education_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 70 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $education_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 70 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $education_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 70 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $education_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 70 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $education_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 70 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $literature_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 71 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $literature_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 71 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $literature_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 71 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $literature_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 71 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $literature_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 71 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $medicine_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 72 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $medicine_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 72 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $medicine_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 72 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $medicine_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 72 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $medicine_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 72 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $agronomy_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 73 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $agronomy_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 73 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $agronomy_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 73 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $agronomy_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 73 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $agronomy_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 73 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $administration_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 74 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $administration_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 74 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $administration_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 74 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $administration_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 74 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $administration_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 74 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $common_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 75 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $common_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 75 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $common_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 75 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $common_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 75 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $common_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 75 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $this->assign('economics_one',$economics_one);
        $this->assign('economics_two',$economics_two);
        $this->assign('economics_three',$economics_three);
        $this->assign('economics_four',$economics_four);
        $this->assign('economics_five',$economics_five);

        $this->assign('law_one',$law_one);
        $this->assign('law_two',$law_two);
        $this->assign('law_three',$law_three);
        $this->assign('law_four',$law_four);
        $this->assign('law_five',$law_five);

        $this->assign('engineering_one',$engineering_one);
        $this->assign('engineering_two',$engineering_two);
        $this->assign('engineering_three',$engineering_three);
        $this->assign('engineering_four',$engineering_four);
        $this->assign('engineering_five',$engineering_five);

        $this->assign('education_one',$education_one);
        $this->assign('education_two',$education_two);
        $this->assign('education_three',$education_three);
        $this->assign('education_four',$education_four);
        $this->assign('education_five',$education_five);

        $this->assign('literature_one',$literature_one);
        $this->assign('literature_two',$literature_two);
        $this->assign('literature_three',$literature_three);
        $this->assign('literature_four',$literature_four);
        $this->assign('literature_five',$literature_five);

        $this->assign('medicine_one',$medicine_one);
        $this->assign('medicine_two',$medicine_two);
        $this->assign('medicine_three',$medicine_three);
        $this->assign('medicine_four',$medicine_four);
        $this->assign('medicine_five',$medicine_five);

        $this->assign('agronomy_one',$agronomy_one);
        $this->assign('agronomy_two',$agronomy_two);
        $this->assign('agronomy_three',$agronomy_three);
        $this->assign('agronomy_four',$agronomy_four);
        $this->assign('agronomy_five',$agronomy_five);

        $this->assign('administration_one',$administration_one);
        $this->assign('administration_two',$administration_two);
        $this->assign('administration_three',$administration_three);
        $this->assign('administration_four',$administration_four);
        $this->assign('administration_five',$administration_five);

        $this->assign('common_one',$common_one);
        $this->assign('common_two',$common_two);
        $this->assign('common_three',$common_three);
        $this->assign('common_four',$common_four);
        $this->assign('common_five',$common_five);

        $this->assign('province',$province);
        $this->assign('second_column',$second_column);
        $this->assign('third_column',$third_column);
        $this->display();
    }

    public function guide_region(){
        $sql1 = "select * from __PREFIX__region2 where `level` = 1 and `display` = 1";
        $province = M()->query($sql1);
        $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 3 and `display` = 1 order by `order` desc";
        $second_column = M()->query($sql2);
        $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 3 and `display` = 1 order by `order` desc";
        $third_column = M()->query($sql3);
      if(isset($_GET['id']) && $_GET['id'] !=''){
        $province_id=$_GET['id'];
        $column_id=$_GET['clm'];

        $p = empty($_REQUEST['p']) ? 1 : $_REQUEST['p'];
        $size = empty($_REQUEST['size']) ? 35 : $_REQUEST['size'];
        $where = " 1 = 1 ";
        $where.=" and `second_column_id` = '$column_id' and `province_id` = '$province_id' and `display` = 1";
        $article=M('article_xueli');
        $res = $article->where($where)->order('`order` desc,`id` desc')->page("$p,$size")->select();
        $count = $article->where($where)->count();
        $pager = new \Think\Page($count,$size);
        $page = $pager->show();

        $province_name=M()->query("select * from __PREFIX__region2 where `id` = '$province_id'");

        $this->assign('province_name',$province_name);
        $second_name=M()->query("select * from __PREFIX__second_column where `id` = '$column_id'");

        $this->assign('second_name',$second_name);
        $this->assign('column_id',$column_id);
      }else{
        $column_id=$_GET['clm'];

        $p = empty($_REQUEST['p']) ? 1 : $_REQUEST['p'];
        $size = empty($_REQUEST['size']) ? 35 : $_REQUEST['size'];
        $where = " 1 = 1 ";
        $where.=" and `second_column_id` = '$column_id' and `display` = 1";
        $article=M('article_xueli');
        $res = $article->where($where)->order('`order` desc,`id` desc')->page("$p,$size")->select();
        $count = $article->where($where)->count();
        $pager = new \Think\Page($count,$size);
        $page = $pager->show();

        $second_name=M()->query("select * from __PREFIX__second_column where `id` = '$column_id'");
        $this->assign('column_id',$column_id);
        $this->assign('second_name',$second_name);
      }
        $this->assign('province',$province);
        $this->assign('second_column',$second_column);
        $this->assign('third_column',$third_column);
        $this->assign('page',$page);
        $this->assign('article',$res);
        $this->display();
    }

    public function guide_region_third(){
        $sql1 = "select * from __PREFIX__region2 where `level` = 1 and `display` = 1";
        $province = M()->query($sql1);
        $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 3 and `display` = 1 order by `order` desc";
        $second_column = M()->query($sql2);
        $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 3 and `display` = 1 order by `order` desc";
        $third_column = M()->query($sql3);
      if(isset($_GET['id']) && $_GET['id'] !=''){
        $province_id=$_GET['id'];
        $column_id=$_GET['sclm'];

        $p = empty($_REQUEST['p']) ? 1 : $_REQUEST['p'];
        $size = empty($_REQUEST['size']) ? 35 : $_REQUEST['size'];
        $where = " 1 = 1 ";
        $where.=" and `third_column_id` = '$column_id' and `province_id` = '$province_id' and `display` = 1";
        $article=M('article_xueli');
        $res = $article->where($where)->order('`order` desc,`id` desc')->page("$p,$size")->select();
        $count = $article->where($where)->count();
        $pager = new \Think\Page($count,$size);
        $page = $pager->show();

        $province_name=M()->query("select * from __PREFIX__region2 where `id` = '$province_id'");

        $this->assign('province_name',$province_name);
        $third_name=M()->query("select * from __PREFIX__third_column where `id` = '$column_id'");

        $this->assign('third_name',$third_name);
        $this->assign('column_id',$column_id);
      }else{
        $column_id=$_GET['sclm'];

        $p = empty($_REQUEST['p']) ? 1 : $_REQUEST['p'];
        $size = empty($_REQUEST['size']) ? 35 : $_REQUEST['size'];
        $where = " 1 = 1 ";
        $where.=" and `third_column_id` = '$column_id' and `display` = 1";
        $article=M('article_xueli');
        $res = $article->where($where)->order('`order` desc,`id` desc')->page("$p,$size")->select();
        $count = $article->where($where)->count();
        $pager = new \Think\Page($count,$size);
        $page = $pager->show();

        $third_name=M()->query("select * from __PREFIX__third_column where `id` = '$column_id'");
        $this->assign('column_id',$column_id);
        $this->assign('third_name',$third_name);
      }
        $this->assign('province',$province);
        $this->assign('second_column',$second_column);
        $this->assign('third_column',$third_column);
        $this->assign('page',$page);
        $this->assign('article',$res);
        $this->display();
    }

    public function guide_fourth(){
      if(isset($_GET['id']) && $_GET['id'] !=''){
        $fourth_column_id=$_GET['id'];
        $sql1 = "select * from __PREFIX__region2 where `level` = 1 limit 32";
        $province = M()->query($sql1);
        $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $second_column = M()->query($sql2);
        $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $third_column = M()->query($sql3);

        $fourth_column_name=M()->query("select * from __PREFIX__fourth_column where `id` = '$fourth_column_id'");
        $third_column_id=$fourth_column_name[0]['third_column_id'];
        $third_column_name=M()->query("select * from __PREFIX__third_column where `id` = '$third_column_id'");

        $p = empty($_REQUEST['p']) ? 1 : $_REQUEST['p'];
        $size = empty($_REQUEST['size']) ? 40 : $_REQUEST['size'];
        $where = " 1 = 1 ";
        $where.=" and `fourth_column_id` = '$fourth_column_id' and `display` = '1'";
        $article=M('article_xueli');
        $res = $article->where($where)->order('`order` desc,`id` desc')->page("$p,$size")->select();
        $count = $article->where($where)->count();
        $pager = new \Think\Page($count,$size);
        $page = $pager->show();

        $this->assign('page',$page);
        $this->assign('article_main',$res);
        $this->assign('province',$province);
        $this->assign('second_column',$second_column);
        $this->assign('third_column',$third_column);
        $this->assign('fourth_column_name',$fourth_column_name);
        $this->assign('third_column_name',$third_column_name);
        $this->display();
      }else{
        echo "getting information failure"."<br/>";
      }
    }

    public function score(){
      $sql1 = "select * from __PREFIX__region2 where `level` = 1 and `display` = 1";
      $province = M()->query($sql1);
      $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 3 and `display` = 1 order by `order` desc";
      $second_column = M()->query($sql2);
      $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 3 and `display` = 1 order by `order` desc";
      $third_column = M()->query($sql3);

      $admission_query=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 94 and `display` = 1");
      $this->assign('admission_query',$admission_query);

      $beijing = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 1")->count();
      $shanghai = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 9")->count();
      $guangdong = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 19")->count();
      $tianjin = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 2")->count();
      $jiangsu = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 10")->count();
      $zhejiang = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 11")->count();
      $chongqin = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 22")->count();
      $hubei = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 17")->count();
      $hunan = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 18")->count();
      $shandong = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 15")->count();
      $shanxi = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 27")->count();
      $sichuan = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 23")->count();
      $fujian = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 13")->count();
      $anhui = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 12")->count();
      $henan = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 16")->count();
      $liaoning = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 6")->count();
      $jilin = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 7")->count();
      $heilongjiang = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 8")->count();
      $this->assign("beijing",$beijing+1);
      $this->assign("shanghai",$shanghai+1);
      $this->assign("guangdong",$guangdong+1);
      $this->assign("tianjin",$tianjin+1);
      $this->assign("jiangsu",$jiangsu+1);
      $this->assign("zhejiang",$zhejiang+1);
      $this->assign("chongqin",$chongqin+1);
      $this->assign("hubei",$hubei+1);
      $this->assign("hunan",$hunan+1);
      $this->assign("shandong",$shandong+1);
      $this->assign("shanxi",$shanxi+1);
      $this->assign("sichuan",$sichuan+1);
      $this->assign("fujian",$fujian+1);
      $this->assign("anhui",$anhui+1);
      $this->assign("henan",$henan+1);
      $this->assign("liaoning",$liaoning+1);
      $this->assign("jilin",$jilin+1);
      $this->assign("heilongjiang",$heilongjiang+1);

      $beijing_article = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 1")->select();
      $shanghai_article = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 9")->select();
      $guangdong_article = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 19")->select();
      $tianjin_article = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 2")->select();
      $jiangsu_article = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 10")->select();
      $zhejiang_article = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 11")->select();
      $chongqin_article = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 22")->select();
      $hubei_article = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 17")->select();
      $hunan_article = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 18")->select();
      $shandong_article = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 15")->select();
      $shanxi_article = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 27")->select();
      $sichuan_article = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 23")->select();
      $fujian_article = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 13")->select();
      $anhui_article = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 12")->select();
      $henan_article = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 16")->select();
      $liaoning_article = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 6")->select();
      $jilin_article = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 7")->select();
      $heilongjiang_article = M('article_xueli')->where("`third_column_id` = 94 and `display` = 1 and `province_id` = 8")->select();

      $this->assign("beijing_article",$beijing_article);
      $this->assign("shanghai_article",$shanghai_article);
      $this->assign("guangdong_article",$guangdong_article);
      $this->assign("tianjin_article",$tianjin_article);
      $this->assign("jiangsu_article",$jiangsu_article);
      $this->assign("zhejiang_article",$zhejiang_article);
      $this->assign("chongqin_article",$chongqin_article);
      $this->assign("hubei_article",$hubei_article);
      $this->assign("hunan_article",$hunan_article);
      $this->assign("shandong_article",$shandong_article);
      $this->assign("shanxi_article",$shanxi_article);
      $this->assign("sichuan_article",$sichuan_article);
      $this->assign("fujian_article",$fujian_article);
      $this->assign("anhui_article",$anhui_article);
      $this->assign("henan_article",$henan_article);
      $this->assign("liaoning_article",$liaoning_article);
      $this->assign("jilin_article",$jilin_article);
      $this->assign("heilongjiang_article",$heilongjiang_article);

      $this->assign('province',$province);
      $this->assign('second_column',$second_column);
      $this->assign('third_column',$third_column);
      $this->display();
    }

    // 二维码
    public function qr_code(){
        // 导入Vendor类库包 Library/Vendor/Zend/Server.class.php
        //http://www.tp-shop.cn/Home/Index/erweima/data/www.99soubao.com
         require_once 'ThinkPHP/Library/Vendor/phpqrcode/phpqrcode.php';
          //import('Vendor.phpqrcode.phpqrcode');
            error_reporting(E_ERROR);
            $url = urldecode($_GET["data"]);
            \QRcode::png($url);
    }

    // 验证码
    public function verify()
    {
        //验证码类型
        $type = I('get.type') ? I('get.type') : '';
        $fontSize = I('get.fontSize') ? I('get.fontSize') : '40';
        $length = I('get.length') ? I('get.length') : '4';

        $config = array(
            'fontSize' => $fontSize,
            'length' => $length,
            'useCurve' => true,
            'useNoise' => false,
        );
        $Verify = new Verify($config);
        $Verify->entry($type);
    }
}
